Skip to content
This repository has been archived by the owner on Dec 8, 2023. It is now read-only.

Exclude the source property from measurements sent to /measurements, … #91

Merged

Conversation

plmwong
Copy link
Contributor

@plmwong plmwong commented May 18, 2017

…as it it invalid to include in the posted request.

Measurements are constructed with a source property, but the API definition doesn't have that property in the POST request body to /v1/measurements (https://www.librato.com/docs/api/#measurements). If that property is there, a 400 Bad Request is returned from the API, with the following detail {"code":400,"message":"Unable to process JSON"}.

In the PR, the source is deleted off the measurement prior to being added to the collection. I left it as a property because the legacyMeasure expects that property to be there in order to create itself through extend.

…as it it invalid to include in the posted request
Copy link
Contributor

@bryanmikaelian bryanmikaelian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@bryanmikaelian bryanmikaelian added this to the 2.x.x: Tagged Measurements milestone May 18, 2017
@bryanmikaelian bryanmikaelian merged commit fb09df9 into librato:master May 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants